<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Easy
  </div>
  <div>
   <h1 class="question_title">
    441. Arranging Coins
   </h1>
   <p>
    You have a total of
    <i>
     n
    </i>
    coins that you want to form in a staircase shape, where every
    <i>
     k
    </i>
    -th row must have exactly
    <i>
     k
    </i>
    coins.
   </p>
   <p>
    Given
    <i>
     n
    </i>
    , find the total number of
    <b>
     full
    </b>
    staircase rows that can be formed.
   </p>
   <p>
    <i>
     n
    </i>
    is a non-negative integer and fits within the range of a 32-bit signed integer.
   </p>
   <p>
    <b>
     Example 1:
    </b>
   </p>
   <pre>
n = 5

The coins can form the following rows:
&curren;
&curren; &curren;
&curren; &curren;

Because the 3rd row is incomplete, we return 2.
</pre>
   <p>
    <b>
     Example 2:
    </b>
   </p>
   <pre>
n = 8

The coins can form the following rows:
&curren;
&curren; &curren;
&curren; &curren; &curren;
&curren; &curren;

Because the 4th row is incomplete, we return 3.
</pre>
  </div>
  <div>
   <h1 class="question_title">
    441. 排列硬币
   </h1>
   <p>
    你总共有&nbsp;
    <em>
     n&nbsp;
    </em>
    枚硬币，你需要将它们摆成一个阶梯形状，第&nbsp;
    <em>
     k&nbsp;
    </em>
    行就必须正好有&nbsp;
    <em>
     k&nbsp;
    </em>
    枚硬币。
   </p>
   <p>
    给定一个数字&nbsp;
    <em>
     n
    </em>
    ，找出可形成完整阶梯行的总行数。
   </p>
   <p>
    <em>
     n&nbsp;
    </em>
    是一个非负整数，并且在32位有符号整型的范围内。
   </p>
   <p>
    <strong>
     示例 1:
    </strong>
   </p>
   <pre>
n = 5

硬币可排列成以下几行:
&curren;
&curren; &curren;
&curren; &curren;

因为第三行不完整，所以返回2.
</pre>
   <p>
    <strong>
     示例 2:
    </strong>
   </p>
   <pre>
n = 8

硬币可排列成以下几行:
&curren;
&curren; &curren;
&curren; &curren; &curren;
&curren; &curren;

因为第四行不完整，所以返回3.
</pre>
  </div>
 </body>
</html>